<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use App\Baqi\WechatAppPay;

class WeChatPayServiceProvider extends ServiceProvider
{
    protected $defer = true;

    /**
     * Bootstrap the application services.
     *
     * @return void
     */
    public function boot()
    {
        //
    }

    /**
     * Register the application services.
     *
     * @return void
     */
    public function register()
    {
        $this->app->singleton( WechatAppPay::class, function ( $app ) {
            return new WechatAppPay( $appid, $mch_id, $notify_url, $key );
        });
    }

    public function provides()
    {
        return [WechatAppPay::class];
    }

}
